package com.haopt.elasticjob.config;

import com.dangdang.ddframe.job.executor.ShardingContexts;
import com.dangdang.ddframe.job.lite.api.listener.ElasticJobListener;
import lombok.extern.slf4j.Slf4j;

/**
 * @author haopt
 * @version 1.0
 * @ClassName MyListener
 * @Description TODO
 * @date 2021/5/13 22:41
 */
@Slf4j
public class MyListener implements ElasticJobListener {
    @Override
    public void beforeJobExecuted(ShardingContexts shardingContexts) {
        log.info(shardingContexts.getJobName() + "执行之前");
    }

    @Override
    public void afterJobExecuted(ShardingContexts shardingContexts) {
        log.info(shardingContexts.getJobName() + "执行之后");
    }
}
